﻿using System;
using System.IO;
using System.Windows.Forms;
using FileCopyExtensions;

namespace WinFormCS
{
    public partial class frmTstCS : Form
    {
        public frmTstCS()
        {
            InitializeComponent();
        }


        private void btn_Copy_Click(object sender, EventArgs e)
        {
            FileInfo source, dest;
            source = new FileInfo(@"\\FREEBOX\Disque dur\Vidéos\A Nous Quatre.avi");
            dest = new FileInfo(@"H:\autre\tmp");

            fileCopyExtensions_ui_cs1.FileSource = source;
            fileCopyExtensions_ui_cs1.FolderDestination = dest;

            fileCopyExtensions_ui_cs1.runCopy(CopyFileOptions.All);
        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            fileCopyExtensions_ui_cs1.cancelCopy();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            fileCopyExtensions_ui_cs1.stopCopy();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            FileInfo source, dest;
            source = new FileInfo(@"\\FREEBOX\Disque dur\Vidéos\A Nous Quatre.avi");
            dest = new FileInfo(@"H:\autre\tmp");

            fileCopyExtensions_ui_cs1.FileSource = source;
            fileCopyExtensions_ui_cs1.FolderDestination = dest;

            fileCopyExtensions_ui_cs1.runCopy(CopyFileOptions.Restartable);
        }
    }
}
